package com.xnyzc.lhy.order.controller.capi.user.tab;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.order.service.user.IOaCUserModeService;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author Bin
 * @Date 2019/7/23 19:32
 **/
@RestController
@RequestMapping("/capi/userTab/oaTabPermission")
public class OaCUserModeController {

    @Autowired
    private IOaCUserModeService iOaCUserModeService;

    /**
     * 部门公务
     * @param userId
     * @return
     */
    @GetMapping("getDepartmentOfficialContent")
    public Rv getDepartmentOfficialContent(
            @ApiParam(name = "userId", value = "用户Id") @RequestParam(value = "userId") long userId){
        /*JwtTokenUtil jwtTokenUtil = new JwtTokenUtil();
        TokenUser tokenUser = TokenUtil.getTokenUser();
        String s = jwtTokenUtil.generateToken(tokenUser);
        System.out.println(s);*/
        String token = "123";
        return Rv.wrap(iOaCUserModeService.getDepartmentOfficialContent(userId, token));
    }
}
